<?php

namespace app\modules\admin\controllers;

use app\common\controllers\AccessController;
use app\components\response\Response;
use app\modules\admin\services\SettleService;

class SettleController extends AccessController {

    public function actionDownload($start_time,$end_time){
        \Yii::$app->getResponse()->format = Response::FORMAT_HTML;
        \Yii::$app->getResponse()->setDownloadHeaders("统计单.xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")->send();
        SettleService::download($start_time,$end_time);
    }
}